#include "widget.h"

#include <QSlider>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
{
    resize(1000, 800);

    QSlider *hsli = new QSlider(Qt::Horizontal, this);
    hsli->move(100, 100);
    hsli->resize(400, 30);
    //设置滑动条的范围
    hsli->setRange(0, 100);
    //设置滑动条的刻度
    hsli->setTickInterval(10);
    //设置刻度在滑动条的下面
    hsli->setTickPosition(QSlider::TicksBelow);
    //每次移动的大小
    hsli->setSingleStep(10);

    QSlider *vsli = new QSlider(Qt::Vertical, this);
    vsli->move(0, 200);
}

Widget::~Widget()
{
}

